<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: angdiff</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: angdiff</td>
      <td class="subheader-left"><a href="matlab:open angdiff">View code for angdiff</a></td>
    </tr>
  </table>
<h1>angdiff</h1><p><span class="helptopic">Difference of two angles</span></p><strong>d</strong> = <span style="color:red>angdiff</span>(<strong>th1</strong>, <strong>th2</strong>) returns the difference between angles <strong>th1</strong> and <strong>th2</strong> on
the circle.  The result is in the interval [-pi pi).  If <strong>th1</strong> is a column
vector, and <strong>th2</strong> a scalar then return a column vector where <strong>th2</strong> is modulo
subtracted from the corresponding elements of <strong>th1</strong>.

<strong>d</strong> = <span style="color:red>angdiff</span>(<strong>th</strong>) returns the equivalent angle to <strong>th</strong> in the interval [-pi pi).

Return the equivalent angle in the interval [-pi pi).

<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2011 Peter Corke.</p>
</body></html>